package cn.sirun.com.fca.personal.center.repo;

import com.tencent.cloud.iov.kernel.constant.HttpHeaderConst;
import com.tencent.cloud.iov.kernel.model.BaseResponse;

import java.util.List;

import cn.sirun.com.fca.account.model.base.CaptchaRequest;
import cn.sirun.com.fca.account.model.base.CarInfoDetailRequest;
import cn.sirun.com.fca.account.model.base.CarInfoDetailResponse;
import cn.sirun.com.fca.account.model.base.SubmitPasswordRequest;
import cn.sirun.com.fca.account.model.base.SubmitPhoneRequest;
import cn.sirun.com.fca.account.model.base.SubmitPhoneResponse;
import cn.sirun.com.fca.account.model.login.PersonalInfo;
import cn.sirun.com.fca.account.model.login.PersonalInfoRequest;
import cn.sirun.com.fca.account.model.register.RegisterSubmitResponse;
import cn.sirun.com.fca.account.model.register.SubmitEmailRequest;
import cn.sirun.com.fca.personal.center.model.bean.CarListResponse;
import cn.sirun.com.fca.personal.center.model.request.ChangeAccountResendRequest;
import cn.sirun.com.fca.personal.center.model.request.DistributorRequest;
import cn.sirun.com.fca.personal.center.model.request.EditResellerRequest;
import cn.sirun.com.fca.personal.center.model.request.IdentityNumberRequest;
import cn.sirun.com.fca.personal.center.model.request.SubmitEmergencyInfoRequest;
import cn.sirun.com.fca.personal.center.model.request.SubmitPhonePinRequest;
import cn.sirun.com.fca.personal.center.model.request.SubmitPlateNumberRequest;
import cn.sirun.com.fca.personal.center.model.request.SubmitUnbindCarRequest;
import cn.sirun.com.fca.personal.center.model.response.CityResponse;
import cn.sirun.com.fca.personal.center.model.response.DistributorResponse;
import cn.sirun.com.fca.personal.center.model.response.SubmitCodeResponse;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;

/**
 * @author vinsonhuang
 * @date 2018/7/31
 */
public interface ProfileService {

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/profile/personal_center/get_personal_info")
    Observable<BaseResponse<PersonalInfo>> getPersonalInfo(@Body PersonalInfoRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/profile/personal_center/submit_emergency_info")
    Observable<BaseResponse<Void>> submitEmergencyInfo(@Body SubmitEmergencyInfoRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/change_info/submit_id")
    Observable<BaseResponse<Void>> submitIdentityNumber(@Body IdentityNumberRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/change_info/submit_phone")
    Observable<BaseResponse<SubmitPhoneResponse>> changeAccountPhone(@Body SubmitPhoneRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/change_info/submit_email")
    Observable<BaseResponse<SubmitPhoneResponse>> changeAccountEmail(@Body SubmitEmailRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/change_info/resend")
    Observable<BaseResponse<SubmitPhoneResponse>> changeAccountResend(@Body ChangeAccountResendRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/change_info/submit")
    Observable<BaseResponse<RegisterSubmitResponse>> changeAccountSubmitCaptcha(@Body CaptchaRequest request);

    @Headers(HttpHeaderConst.ADD_COOKIE)
    @POST("/v2/account/edit_info/resend")
    Observable<BaseResponse<SubmitPhoneResponse>> bindAccountResend();

    @Headers(HttpHeaderConst.ADD_COOKIE)
    @POST("/v2/account/edit_info/submit_code")
    Observable<BaseResponse<RegisterSubmitResponse>> submitbindAccountCaptcha(@Body CaptchaRequest request);

    @Headers(HttpHeaderConst.ADD_COOKIE)
    @POST("/v2/account/edit_info/submit_info")
    Observable<BaseResponse<SubmitPhoneResponse>> submitBindAccount(@Body ChangeAccountResendRequest request);

    @Headers(HttpHeaderConst.ADD_COOKIE)
    @POST("/v1/account/pin/submit_info")
    Observable<BaseResponse<SubmitPhoneResponse>> submitPhonePinCaptcha(@Body SubmitPhoneRequest request);

    @Headers(HttpHeaderConst.ADD_COOKIE)
    @POST("/v1/account/pin/submit_code")
    Observable<BaseResponse<SubmitCodeResponse>> submitVerifyCaptcha(@Body CaptchaRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/public_info/get_all_pro_city")
    Observable<BaseResponse<List<CityResponse>>> getAllCity();

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/iam_gateway/car_management/edit_reseller")
    Observable<BaseResponse<Void>> editReseller(@Body EditResellerRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/public_info/get_city_dealers")
    Observable<BaseResponse<List<DistributorResponse>>> getCityDistributor(@Body DistributorRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/iam_gateway/car_management/get_car_detail")
    Observable<BaseResponse<CarInfoDetailResponse>> getCarInfoDetail(@Body CarInfoDetailRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/iam_gateway/car_management/get_all_car_status")
    Observable<BaseResponse<CarListResponse>> getCarList();

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/iam_gateway/car_management/set_current_vehicle")
    Observable<BaseResponse<Void>> setCurrentVehicle(@Body CarInfoDetailRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/iam_gateway/car_management/edit_car_number")
    Observable<BaseResponse<Void>> editCarNumber(@Body SubmitPlateNumberRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/iam_gateway/car_management/unbind")
    Observable<BaseResponse<Void>> unBindCar(@Body SubmitUnbindCarRequest request);

}
